package cn.yl.springaop.controller;

import cn.yl.springaop.config.PermissionAnnotation;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;

// 配合自定义注解的简单权限校验
@RestController
@RequestMapping(value = "/permission")
public class TestController {
    
    @RequestMapping(value = "/check", method = RequestMethod.POST)
    // 添加这个注解
    @PermissionAnnotation
    public JSONObject getGroupList(@RequestBody JSONObject request) {
        return JSON.parseObject("{\"message\":\"SUCCESS\",\"code\":200}");
    }
}
